﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        tag_id: {{ new_tag_id }},
        tag_name: '',
        heat_factor: 1,
        orderno: '',
    },

    methods: {
        /**
         * 创建新的房间品类
         */
        newRoomTag() {
            let url = "{% url 'gma:api_new_room_tag' %}";
            let data = {
                'tag_id' : this.tag_id,
                'tag_name' : this.tag_name,
                'heat_factor' : this.heat_factor,
                'orderno' : this.orderno,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('创建成功');
                redirect();
            });
        },

        cancel() {
            window.history.back();
        },
    },

    mounted() {
    },
});
